function GetPages(options) {
	const { ignore = [] } = options || {};
	const files = require.context('@/pages/', true, /\.vue$/);
	const routes = files
		.keys()
		.map((e) => {
			const name = e.replace('./', '').replace('.vue', '').replace('/', '.');
			const path = e.replace('./', '/pages/').replace('.vue', '');

			return {
				path,
				name,
			};
		})
		.filter((e) => !ignore.includes(e.path));

	return routes;
}

export { GetPages };
